<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>blog</title>
    <link rel="stylesheet" href="http://labfile.oss.aliyuncs.com/amazeui/2.2.1/css/amazeui.min.css">
</head>
<body>
    <header class="am-topbar am-topbar-fixed-top">
        <div class="am-container">
            <h1 class="am-topbar-brand">
                <a href="#">blog</a>
            </h1>
            <div class="am-collapse am-topbar-collapse" id="collapse-head">
                <ul class="am-nav am-nav-pills am-topbar-nav">
                    <li><a href="/">主页</a></li>
                    <% if (user) { %>
                    <li><a href="/post">发表</a></li>
                    <li><a href="/logout">登出</a></li>
                    <% } else { %>
                    <li><a title="登录" href="/login">登录</a></li>
                    <li><a title="注册" href="/reg">注册</a></li>
                    <% } %>
                </ul>
            </div>
        </div>
    </header>
    <article>
        <br><br><br>
        <% if (success) { %>
        <div><%= success %></div>
        <% } %>
        <% if (error) { %>
        <div><%= error %> </div>
        <% } %>

